package com.cykj.page04;

/**
 * @BelongsProject: HandTomcat
 * @BelongsPackage: com.cykj.page04
 * @Author: 阿隆
 * @CreateTime: 2025-10-29 19:03
 * @Description: TODO
 * @Version: 1.0
 */
public class Student {
    public String name;

    private int age;


    public Student() {
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    public Student(String name) {
        this.name = name;
    }

    private Student(int age) {
        this.age = age;
    }

    public Student(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public void playing(String name) {
        System.out.println("玩.... " + name);
    }


    public void eat() {
        System.out.println("吃....");
    }

    private void sleep() {
        System.out.println("睡....");
    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}